<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
		"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
		"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">

	<module name="SuppressionFilter">
		<property name="file" value="${config_loc}/checkstyle-suppressions.xml"/>
	</module>

	<!-- Root Checks -->
	<module name="RegexpHeader">
		<property name="headerFile" value="${config_loc}/checkstyle-header.txt"/>
		<property name="fileExtensions" value="java"/>
	</module>
	<module name="NewlineAtEndOfFile"/>

	<!-- TreeWalker Checks -->
	<module name="TreeWalker">

		<!-- Annotations -->
		<module name="AnnotationUseStyle">
			<property name="elementStyle" value="compact"/>
		</module>
		<module name="MissingOverride"/>
		<module name="PackageAnnotation"/>
		<module name="AnnotationLocation">
			<property name="allowSamelineSingleParameterlessAnnotation"
					  value="false"/>
		</module>

		<!-- Block Checks -->
		<module name="EmptyBlock">
			<property name="option" value="text"/>
		</module>
		<module name="LeftCurly"/>
		<module name="RightCurly">
			<property name="option" value="alone"/>
		</module>
		<module name="NeedBraces"/>
		<module name="AvoidNestedBlocks"/>

		<!-- Class Design -->
		<module name="FinalClass"/>
		<module name="InterfaceIsType"/>
		<module name="HideUtilityClassConstructor"/>
		<module name="MutableException"/>
		<module name="InnerTypeLast"/>
		<module name="OneTopLevelClass"/>

		<!-- Coding -->
		<module name="CovariantEquals"/>
		<module name="EmptyStatement"/>
		<module name="EqualsHashCode"/>
		<module name="InnerAssignment"/>
		<module name="SimplifyBooleanExpression"/>
		<module name="SimplifyBooleanReturn"/>
		<module name="StringLiteralEquality"/>
		<module name="NestedForDepth">
			<property name="max" value="3"/>
		</module>
		<module name="NestedIfDepth">
			<property name="max" value="4"/>
		</module>
		<module name="NestedTryDepth">
			<property name="max" value="3"/>
		</module>
		<module name="MultipleVariableDeclarations"/>
		<module name="RequireThis">
			<property name="validateOnlyOverlapping" value="false"/>
			<property name="checkMethods" value="false"/>
		</module>
		<module name="OneStatementPerLine"/>

		<!-- Imports -->
		<module name="AvoidStarImport"/>
		<module name="AvoidStaticImport">
			<property name="excludes"
					  value="org.assertj.core.api.Assertions.*,
				org.awaitility.Awaitility.*,
				org.junit.jupiter.api.Assertions.*,
				org.junit.Assert.*,
				org.junit.Assume.*,
				org.junit.internal.matchers.ThrowableMessageMatcher.*,
				org.hamcrest.CoreMatchers.*,
				org.hamcrest.MatcherAssert.*,
				org.hamcrest.Matchers.*,
				org.mockito.Mockito.*,
				org.mockito.BDDMockito.*,
				org.mockito.ArgumentMatchers.*,
				org.springframework.kafka.test.hamcrest.KafkaMatchers.*,
				org.springframework.kafka.test.assertj.KafkaConditions.*"/>
		</module>
		<module name="IllegalImport"/>
		<module name="RedundantImport"/>
		<module name="UnusedImports">
			<property name="processJavadoc" value="true"/>
		</module>
		<module name="ImportOrder">
			<property name="groups" value="java,/^javax?\./,org,org.springframework,*"/>
			<property name="ordered" value="true"/>
			<property name="separated" value="true"/>
			<property name="option" value="top"/>
			<property name="sortStaticImportsAlphabetically" value="true"/>
		</module>

		<!-- Javadoc Comments -->
		<module name="JavadocType">
			<property name="scope" value="package"/>
			<property name="authorFormat" value=".+\s.+"/>
		</module>
		<module name="JavadocMethod">
		</module>
		<module name="JavadocVariable">
			<property name="scope" value="public"/>
		</module>
		<module name="JavadocStyle">
			<property name="checkEmptyJavadoc" value="true"/>
		</module>
		<module name="NonEmptyAtclauseDescription"/>
		<module name="JavadocTagContinuationIndentation">
			<property name="offset" value="0"/>
		</module>
		<module name="AtclauseOrder">
			<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF"/>
			<property name="tagOrder" value="@param, @author, @since, @see, @version, @serial, @deprecated"/>
		</module>
		<module name="AtclauseOrder">
			<property name="target" value="METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
			<property name="tagOrder" value="@param, @return, @throws, @since, @deprecated, @see"/>
		</module>

		<!-- Miscellaneous -->
		<module name="CommentsIndentation">
			<property name="tokens" value="BLOCK_COMMENT_BEGIN"/>
		</module>
		<module name="UpperEll"/>
		<module name="ArrayTypeStyle"/>
		<module name="OuterTypeFilename"/>

		<!-- Modifiers -->
		<module name="RedundantModifier"/>

		<!-- Regexp -->
		<module name="RegexpSinglelineJava">
			<property name="format" value="^\t* +\t*\S"/>
			<property name="message"
					  value="Line has leading space characters; indentation should be performed with tabs only."/>
			<property name="ignoreComments" value="true"/>
		</module>
		<module name="RegexpSinglelineJava">
			<property name="maximum" value="0"/>
			<property name="format" value="org\.mockito\..*Mockito\.(when|doThrow|doAnswer)"/>
			<property name="message"
					  value="Please use BDDMockito instead of Mockito.(when|doThrow|doAnswer)."/>
			<property name="ignoreComments" value="true"/>
		</module>
		<module name="RegexpSinglelineJava">
			<property name="maximum" value="0"/>
			<property name="format" value="org\.junit\.Assert\.assert"/>
			<property name="message"
					  value="Please use AssertJ imports."/>
			<property name="ignoreComments" value="true"/>
		</module>
		<module name="RegexpSinglelineJava">
			<property name="maximum" value="0"/>
			<property name="format" value="org\.junit\.jupiter\.api\.Assertions\.assert"/>
			<property name="message"
					  value="Please use AssertJ imports."/>
			<property name="ignoreComments" value="true"/>
		</module>
		<module name="Regexp">
			<property name="format" value="[ \t]+$"/>
			<property name="illegalPattern" value="true"/>
			<property name="message" value="Trailing whitespace"/>
		</module>
		<module name="Regexp">
			<property name="format" value="System.(out|err).print"/>
			<property name="illegalPattern" value="true"/>
			<property name="message" value="System.out or .err"/>
		</module>

		<!-- Whitespace -->
		<module name="GenericWhitespace"/>
		<module name="MethodParamPad"/>
		<module name="NoWhitespaceAfter">
			<property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS, ARRAY_DECLARATOR"/>
		</module>
		<module name="NoWhitespaceBefore"/>
		<module name="ParenPad"/>
		<module name="TypecastParenPad"/>
		<module name="WhitespaceAfter"/>
		<module name="WhitespaceAround"/>
		<!-- Add the EmptyLineSeparator module -->
		<module name="EmptyLineSeparator">
			<property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, STATIC_INIT, INSTANCE_INIT, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
			<property name="allowNoEmptyLineBetweenFields" value="false"/>
			<property name="allowMultipleEmptyLines" value="false"/>
		</module>

	</module>
</module>
